import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';

import {MainComponent} from './main.component';

const routes: Routes = [
  {
    path: '', component: MainComponent, children: [
      {path: '', redirectTo: 'home', pathMatch: 'full'},
      {path: 'home', loadChildren: './home/home.module#HomeModule'},
      {path: 'news', loadChildren: './news/news.module#NewsModule'},
      {path: 'type', loadChildren: './type/type.module#TypeModule'},
      {path: 'notice', loadChildren: './notice/notice.module#NoticeModule'},
      {path: 'department', loadChildren: './department/department.module#DepartmentModule'},
      {path: 'account', loadChildren: './account/account.module#AccountModule'},
      {path: 'analyze', loadChildren: './analyze/analyze.module#AnalyzeModule'}
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MainRoutingModule {
}
